import * as carbon from "@vicons/carbon"
import * as ionicons5 from "@vicons/ionicons5"

const carbonIcons: any = carbon
const ionicons5Icons: any = ionicons5
const allIcons: any = Object.assign({}, carbonIcons, ionicons5Icons)

/**
 * 从所有图标中获取
 * @param key
 */
export const allIcon = (key: string) => {
    return allIcons[key]
}

/**
 * 从 carbon 中获取
 * @param key
 */
export const carbonIcon = (key: string) => carbonIcons[key]

/**
 * 从 ionicons5 中获取
 * @param key
 */
export const ionicons5Icon = (key: string) => ionicons5Icons[key]

/**
 * 获取所有图标
 */
export const getAllIcons = () => allIcons

/**
 * 获取 carbon 图标
 */
export const getCarbonIcons = () => carbonIcons

/**
 * 获取 ionicons5 图标
 */
export const getIonicons5Icons = () => ionicons5Icons
